package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.service.ShopTypeService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.business.mapper.ShopTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.domain.ShopType;


/**

 * 商铺类型Service业务层处理

 *

 * @author ruoyi

 * @date 2025-06-09
 */
@Service
public class ShopTypeServiceImpl implements ShopTypeService
{
    @Autowired
    private ShopTypeMapper tbShopTypeMapper;

    /**

     * 查询商铺类型
     *
     * @param id 商铺类型主键
     * @return 商铺类型
     */
    @Override
    public ShopType selectTbShopTypeById(String id)
    {
        return tbShopTypeMapper.selectTbShopTypeById(id);
    }

    /**

     * 查询商铺类型列表
     *
     * @param shopType 商铺类型
     * @return 商铺类型
     */
    @Override
    public List<ShopType> selectTbShopTypeList(ShopType shopType)
    {
        return tbShopTypeMapper.selectTbShopTypeList(shopType);
    }

    /**

     * 新增商铺类型
     *
     * @param shopType 商铺类型
     * @return 结果
     */
    @Override
    public int insertTbShopType(ShopType shopType)
    {
        shopType.setCreateTime(DateUtils.getNowDate());
        return tbShopTypeMapper.insertTbShopType(shopType);
    }

    /**

     * 修改商铺类型
     *
     * @param shopType 商铺类型
     * @return 结果
     */
    @Override
    public int updateTbShopType(ShopType shopType)
    {
        shopType.setUpdateTime(DateUtils.getNowDate());
        return tbShopTypeMapper.updateTbShopType(shopType);
    }

    /**

     * 批量删除商铺类型
     *
     * @param ids 需要删除的商铺类型主键
     * @return 结果
     */
    @Override
    public int deleteTbShopTypeByIds(String[] ids)
    {
        return tbShopTypeMapper.deleteTbShopTypeByIds(ids);
    }

    /**

     * 删除商铺类型信息
     *
     * @param id 商铺类型主键
     * @return 结果
     */
    @Override
    public int deleteTbShopTypeById(String id)
    {
        return tbShopTypeMapper.deleteTbShopTypeById(id);
    }
}